<?php
/**
 * Created by PhpStorm.
 * Author: Shadow
 * Date: 2022/4/2
 * Time: 2:33 下午
 * description: article-editor.blade.php
 */?>

{{--引入本地样式--}}
<link rel="stylesheet" href="/static/bootstrap-4.6.1-dist/css/bootstrap.css">
<script src="/static/bootstrap-4.6.1-dist/js/bootstrap.js"></script>
<meta name="referrer" content="no-referrer">

<h2>编辑页面</h2>

<form role="form" method="post" action="editor" enctype="multipart/form-data">
    @csrf
    <div class="form-group">
        <input type="hidden" name="id" value="{{$info->id}}">
        <label for="name">Title</label>
        <input type="text" class="form-control" name="title" value="{{$info->title}}"
               placeholder="请输入标题">
    </div>
    <div class="form-group">
        <label for="name">Author</label>
        <input type="text" class="form-control" name="author"  value="{{$info->author}}"
               placeholder="请输入作者">
    </div>
    <div class="form-group">
        <label for="name">Image</label>
        <input type="file" class="form-control" name="image"
               placeholder="请输入作者">
        <input type="hidden" name="old_image" value="{{$info->image}}">
        <img src="{{$info->image}}" alt="" width="80px" height="80px">
    </div>
    <div class="form-group">
        <label for="name">Desc</label>
        <input type="text" class="form-control" name="desc"  value="{{$info->desc}}"
               placeholder="请输入简介">
    </div>
    <div class="form-group">
        <label  for="name">Status</label>
        <input type="radio" class="form-inline" name="status" value="1"  {{$info->status == 1 ? 'checked':''}}>正常
        <input type="radio" class="form-inline" name="status" value="2" {{$info->status == 2 ? 'checked':''}}>冻结
    </div>

    <button type="submit" class="btn btn-default">提交</button>
</form>
